package com.otojob;

import com.spring4all.swagger.EnableSwagger2Doc;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.Caching;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@MapperScan("com.otojob.mapper")//Mapper路径映射
@EnableSwagger2Doc//直接调用swagger
@EnableCaching//启动缓存注解
public class OtojobApplication {

    public static void main(String[] args) {
        SpringApplication.run(OtojobApplication.class, args);
    }
    /**
     * http请求封装实体
     * @return
     */
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }

}
